package com.byxy.luntan.controller;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import com.byxy.luntan.vo.TipVO;


@Controller
public class MainController {

	@GetMapping("toMainPage.do")
	public String main(Model model) {
		List<TipVO> tips = new ArrayList<>();
		TipVO vo = new TipVO();
		vo.setTipId(1);
		vo.setTipClick(76);
		vo.setTabName("其他");
		vo.setTipModifyTime(new Date());
		vo.setTipPublishTime(new Date());
		vo.setTipReplies(6);
		vo.setTipTitle("贴子测试");
		vo.setUserName("user");
		vo.setTipIsdeleted(1);
		vo.setTipIsKnot(1);		
		tips.add(vo);
		model.addAttribute("tips", tips);
		return "main";
		
		
	}
}
